package cn.peach.hrm.constants;

/**
 * 错误码
 */
public enum ErrorCode {
    // 用户名为空的情况
    LOGIN_USERNAME_IS_NULL("1020","用户名不能为空"),
    LOGIN_PASSWORD_IS_NULL("1030","密码不能为空"),
    TENANT_NAME_IS_NULL("1040","公司名不能为空"),
    SYSTEM_ERROR_EXCEPTION("10500","服务器异常");

    private String code;
    private String message;

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getFullMessage(){
        return this.message + "[" + this.getCode() + "]";
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
